/**
 * 时间相关路由
 */

const express = require('express');
const router = express.Router();

// 获取当前服务器时间
router.get('/', (req, res) => {
  const now = new Date();
  
  res.json({
    code: 200,
    success: true,
    message: '获取服务器时间成功',
    data: {
      timestamp: now.getTime(),
      utc: now.toUTCString(),
      local: now.toString()
    }
  });
});

module.exports = router; 